package com.lucker.ds.model;

/**
 * user_virtual_money_history
 * @author 
 */
public class UserVirtualMoneyHistory extends BaseValueObject {
    private Long id;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 资产账户变化前数量
     */
    private Long userVirtualMoneyBeforAmount;

    /**
     * 资产账户变化后数量
     */
    private Long userVirtualMoneyAfterAmount;

    /**
     * 资产账户变化量
     */
    private Long userVirtualMoneyChangeAmount;

    /**
     * 资产账户变化类型 1 增加 0 扣减
     */
    private Long userVirtualMoneyChangeType;

    /**
     * 资产账户变化业务类型ID
     */
    private Long userVirtualMoneyChangeBusinessType;

    /**
     * 资产账户变化业务类型名称
     */
    private String userVirtualMoneyChangeBusinessTypeName;

    /**
     * 资产账户变化相关联业务ID
     */
    private String userVirtualMoneyBusinessId;

    private String customQuerySqlText = null;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Long getUserVirtualMoneyBeforAmount() {
        return userVirtualMoneyBeforAmount;
    }

    public void setUserVirtualMoneyBeforAmount(Long userVirtualMoneyBeforAmount) {
        this.userVirtualMoneyBeforAmount = userVirtualMoneyBeforAmount;
    }

    public Long getUserVirtualMoneyAfterAmount() {
        return userVirtualMoneyAfterAmount;
    }

    public void setUserVirtualMoneyAfterAmount(Long userVirtualMoneyAfterAmount) {
        this.userVirtualMoneyAfterAmount = userVirtualMoneyAfterAmount;
    }

    public Long getUserVirtualMoneyChangeAmount() {
        return userVirtualMoneyChangeAmount;
    }

    public void setUserVirtualMoneyChangeAmount(Long userVirtualMoneyChangeAmount) {
        this.userVirtualMoneyChangeAmount = userVirtualMoneyChangeAmount;
    }

    public Long getUserVirtualMoneyChangeType() {
        return userVirtualMoneyChangeType;
    }

    public void setUserVirtualMoneyChangeType(Long userVirtualMoneyChangeType) {
        this.userVirtualMoneyChangeType = userVirtualMoneyChangeType;
    }

    public Long getUserVirtualMoneyChangeBusinessType() {
        return userVirtualMoneyChangeBusinessType;
    }

    public void setUserVirtualMoneyChangeBusinessType(Long userVirtualMoneyChangeBusinessType) {
        this.userVirtualMoneyChangeBusinessType = userVirtualMoneyChangeBusinessType;
    }

    public String getUserVirtualMoneyChangeBusinessTypeName() {
        return userVirtualMoneyChangeBusinessTypeName;
    }

    public void setUserVirtualMoneyChangeBusinessTypeName(String userVirtualMoneyChangeBusinessTypeName) {
        this.userVirtualMoneyChangeBusinessTypeName = userVirtualMoneyChangeBusinessTypeName;
    }

    public String getUserVirtualMoneyBusinessId() {
        return userVirtualMoneyBusinessId;
    }

    public void setUserVirtualMoneyBusinessId(String userVirtualMoneyBusinessId) {
        this.userVirtualMoneyBusinessId = userVirtualMoneyBusinessId;
    }

    public void setCustomQuerySqlText(String customQuerySqlText) {
        this.customQuerySqlText = customQuerySqlText;
    }

    public String getCustomQuerySqlText() {
        return customQuerySqlText;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByUserId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_id asc";
            }else{
                this.orderStr = this.orderStr + ",user_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_id desc";
            }else{
                this.orderStr = this.orderStr + ",user_id desc";
            }
        }
    }

    public void orderByUserVirtualMoneyBeforAmount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_befor_amount asc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_befor_amount asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_befor_amount desc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_befor_amount desc";
            }
        }
    }

    public void orderByUserVirtualMoneyAfterAmount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_after_amount asc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_after_amount asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_after_amount desc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_after_amount desc";
            }
        }
    }

    public void orderByUserVirtualMoneyChangeAmount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_change_amount asc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_change_amount asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_change_amount desc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_change_amount desc";
            }
        }
    }

    public void orderByUserVirtualMoneyChangeType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_change_type asc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_change_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_change_type desc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_change_type desc";
            }
        }
    }

    public void orderByUserVirtualMoneyChangeBusinessType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_change_business_type asc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_change_business_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_change_business_type desc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_change_business_type desc";
            }
        }
    }

    public void orderByUserVirtualMoneyChangeBusinessTypeName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_change_business_type_name asc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_change_business_type_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_change_business_type_name desc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_change_business_type_name desc";
            }
        }
    }

    public void orderByUserVirtualMoneyBusinessId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_business_id asc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_business_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_virtual_money_business_id desc";
            }else{
                this.orderStr = this.orderStr + ",user_virtual_money_business_id desc";
            }
        }
    }
}